define('sf.b2c.mall.business.config', ['zepto'], function($) {
  'use strict';

  var MD5_KEY = 'www.tepin.hk';

  var NONE_APPEND_WORD = 'renshengjiushiyikebocai';

  var M_HOST = 'http://m.tepin.hk/';
  var HTTPS_M_HOST = 'https://m.tepin.hk/';

  var openHttps = true;

  // https 开关 begin
  var httpsAdapter = function() {
    if (openHttps) {
      HTTPS_M_HOST = 'https://m.tepin.hk/';
    } else {
      HTTPS_M_HOST = 'http://m.tepin.hk/';
    }
  };
  // https 开关 end

  httpsAdapter.apply(this);

  var VER = $('#version').attr('data-version') || Date.now();

  var DEFAULT_REQUEST_HEADER = {
    _aid: 3,
    _sm: 'md5'
  };

  var host = window.location.hostname;
  var DEV_API_URL = {
    url: M_HOST + 'm.api',
    fileurl: M_HOST + 'file.api',
    baseurl: M_HOST
  };

  var DEV_API_HTTPS_URL = {
    url: HTTPS_M_HOST + 'm.api',
    fileurl: HTTPS_M_HOST + 'file.api'
  };

  var DEV_FILE_LINK = {
    'agreement': M_HOST + 'other/agreement.html?t=' + VER,
    'alipayframe': M_HOST + 'order/alipayframe.html?t=' + VER,
    'center': M_HOST + 'center/center.html?t=' + VER,
    'detail': M_HOST + 'detail/',
    'gotopay': M_HOST + 'order/gotopay.html?t=' + VER,
    'index': M_HOST + 'index.html',
    'login': openHttps ? M_HOST + 'user/login.html?t=' + VER : M_HOST + 'user/i.login.html?t=' + VER,
    'ilogin': HTTPS_M_HOST + 'user/i.login.html?t=' + VER,
    'order': M_HOST + 'order/order.html?t=' + VER,
    'mypoint': M_HOST + 'order/mypoint.html?t=' + VER,
    'orderdetail': M_HOST + 'order/orderdetail.html?t=' + VER,
    'orderlist': M_HOST + 'order/orderlist.html?t=' + VER,
    'pay-success': M_HOST + 'order/pay-success.html?t=' + VER,
    'register': openHttps ? M_HOST + 'user/register.html?t=' + VER : M_HOST + 'user/i.register.html?t=' + VER,
    'iregister': HTTPS_M_HOST + 'user/i.register.html?t=' + VER,
    'coupon': M_HOST + 'center/coupon.html?t=' + VER,
    'setpassword': M_HOST + 'user/setpassword.html?t=' + VER,
    'bindaccount': M_HOST + 'user/bindaccount.html?t=' + VER,
    'weixincenter': M_HOST + 'user/weixincenter.html?t=' + VER,
    'luckymoneyshare': M_HOST + 'other/luckymoneyshare.html?t=' + VER,
    'luckymoneyaccept': M_HOST + 'other/luckymoneyaccept.html?t=' + VER,
    'recaddrmanage': M_HOST + 'center/recaddrmanage.html?t=' + VER,
    // 'getalipaycoupon'   : M_HOST + 'getcoupons.html?t='+VER,
    'paysuccess': M_HOST + 'order/pay-success?t=' + VER
  };

  return {
    setting: {
      'ver': VER,
      'none_append_word': NONE_APPEND_WORD,
      'default_header': DEFAULT_REQUEST_HEADER,
      'md5_key': MD5_KEY,
      'api': DEV_API_URL,
      'httpsapi': DEV_API_HTTPS_URL,
      'link': DEV_FILE_LINK,
      'openHttps': openHttps,
    }
  };
});